package com.zhdl.modules.prefiresys.web.service.impl;

import com.zhdl.modules.prefiresys.service.*;
import com.zhdl.modules.prefiresys.web.service.ResetService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

@Slf4j
@Service
public class ResetServiceImpl implements ResetService {

    @Autowired
    private DefAreaAlarmRecService defAreaAlarmRecService;
    @Autowired
    private DefAreaHourRecService defAreaHourRecService;
    @Autowired
    private DetectorAnalogRecService detectorAnalogRecService;
    @Autowired
    private DetectorBlowBackLogService detectorBlowBackLogService;
    @Autowired
    private DetectorHistoryDataService detectorHistoryDataService;
    @Autowired
    private DetectorSwitchRecService detectorSwitchRecService;
    @Autowired
    private FactoryWeeklyRiskService factoryWeeklyRiskService;


    /**
     * 删除所有设备信息
     */
    @Override
    @Transactional
    public void deleteRec() {
        defAreaAlarmRecService.deleteAll();
        defAreaHourRecService.deleteAll();
        detectorAnalogRecService.deleteAll();
        detectorBlowBackLogService.deleteAll();
        detectorHistoryDataService.deleteAll();
        detectorSwitchRecService.deleteAll();
        factoryWeeklyRiskService.deleteAll();
        //agoWeekRiskTrendService.countAgoWeekAlarmData();
        //agoWeekRiskTrendService.countLocalHostAlarmData();
    }
}
